package se.grp03.fmtuner.scheduler.message;

import se.grp03.fmtuner.scheduler.ChannelManager;
import se.grp03.fmtuner.scheduler.SchedulerManager;
import se.grp03.fmtuner.scheduler.io.UdpConstants;

public class ScanMessage implements MessageInterface {

	private SchedulerManager sm;
	private String message;

	public ScanMessage(String msg) {
		this.message = msg;
		sm = SchedulerManager.getInstance();
	}

	@Override
	public String process() {
		ChannelManager cm = ChannelManager.getInstance();
		String response = cm.getChannelsAsString();
		if (response != null) {
			//System.out.println("** ScanMessage Processing msg " + response);
			return response;
		}
		return UdpConstants.ERROR;
	}
}